<template>
  <a-drawer
    width="45%"
    :title="formTitle"
    :label-col="4"
    :wrapper-col="14"
    :visible="open"
    :body-style="{ height: 'calc(100vh - 100px)', overflow: 'auto' }"
    @close="cancel"
  >
    <a-form-model ref="form" :model="form" :rules="rules" layout="vertical">
      <a-spin :spinning="spinning" :delay="delayTime" tip="Loading...">
        <a-row :gutter="32">
          <a-col :span="12">
            <a-form-model-item label="来源" prop="laiyuan">
              <a-input v-model="form.laiyuan" placeholder="请输入来源" />
            </a-form-model-item>
          </a-col>
          <a-col :span="12">
            <a-form-model-item label="城市" prop="city">
              <a-select
                placeholder="请选择城市"
                v-model="form.city"
                :getPopupContainer="
                  (triggerNode) => {
                    return triggerNode.parentNode || document.body;
                  }
                "
                style="width: 100%"
                allow-clear
              >
                <a-select-option
                  v-for="(d, index) in cityOptions"
                  :key="index"
                  :value="d.dictValue.replace('市', '')"
                  >{{ d.dictLabel }}</a-select-option
                >
              </a-select>
            </a-form-model-item>
          </a-col>
          <a-col :span="12">
            <a-form-model-item label="1广告客户 2其他客户" prop="laiyuanType">
              <a-input
                v-model="form.laiyuanType"
                placeholder="请输入1广告客户 2其他客户"
              />
            </a-form-model-item>
          </a-col>
          <a-col :span="12">
            <a-form-model-item label="当前线索成本" prop="cost">
              <a-input-number
                v-model="form.cost"
                :min="0"
                style="width: 100%"
              />
            </a-form-model-item>
          </a-col>
        </a-row>
      </a-spin>
      <div class="bottom-control">
        <a-space>
          <a-button @click="cancel"> 取消 </a-button>
          <a-button type="primary" @click="submitForm"> 保存 </a-button>
        </a-space>
      </div>
    </a-form-model>
  </a-drawer>
</template>
<script>
import BizXiansuoChengbenLogEditForm from "./BizXiansuoChengbenLogForm";
export default {
  ...BizXiansuoChengbenLogEditForm,
};
</script>
